DEW.RegistroController = function() {};

$.extend(DEW.RegistroController.prototype, {
    render: function() {
        DEW.ViewManager.removeAll();
        this.displayLayout();
        this.displayHeader();
        this.displayBody();
        this.displayFooter();
    },

    displayLayout: function() {
        var baseLayout = new DEW.BaseLayout();
        baseLayout.render();
        $(baseLayout.el).appendTo("#content");
        DEW.ViewManager.addView(baseLayout);
    },

        displayHeader: function() {
        var header = new DEW.Header({
            logo: {
                src: 'images/logo.jpg',
                alt: 'Logo'
            },
            enlaces: [{
                    id:0,
                    text:'Home',
                    show:true,
                    textonly:false,
                    url: 'home',
                    handler:function(){}
            },{
                    id:1,
                    text: 'Que es?',
                    url:"Quees",
                    show:true,
                    textonly: false,
                       handler:function(){}
            },{
                    id: 2,
                    text: 'Apoya un Proyecto',
                    show:true,
                    textonly: false,
                     handler:function(){}
                },{
                    id:3,
                    text: 'Registrate',
                    show:true,
                    url:"RegistroUser",
                    textonly: false,
                    handler:function(){}
                }]
        });
        header.render();
        $(header.el).appendTo("#header");
    },

    displayBody: function() {
        
        var registro = new DEW.RegistroUser();
        registro.render();
        $(registro.el).appendTo("#body");
        DEW.ViewManager.addView(registro);
        
    },

    displayFooter: function() {
        var footer = new DEW.Footer();
        footer.render();
        $(footer.el).appendTo("#footer");
        DEW.ViewManager.addView(footer);
    }

});